# _*_ coding utf-8 _*_
# FILENAME：.py
# DESCRIPTION: 常用工具类
# AUTH: ZB
# DATE: 2022/6/2 10:00 下午


"""
转换字符串
"""
def xstr(s):
    if s is None:
        return ''
    return str(s)

"""
判断是否为数字
"""
def is_number(s):
    try:
        nb = float(s) #将字符串转换成数字成功则返回True
        return True
    except ValueError as e:
        return False #如果出现异常则返回False